function [act logact] = gaussRobust(mu, covar, X)


[N D] = size(X);

centered_X = X - ones(N, 1)*mu;
exp_dist2 = sum(centered_X*inv(covar).*centered_X, 2);

logact = - 0.5*exp_dist2 - 0.5*logdet_chol(covar) - 0.5*D*log(2*pi);
act = exp(logact);
